package io.geekidea.springbootplus.system.entity;

import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import io.geekidea.springbootplus.framework.core.validator.groups.Update;
import org.springframework.data.annotation.Transient;

/**
 * 
 *
 * @author miko
 * @since 2020-10-15
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@TableName("Schedule")
@ApiModel(value = "Schedule对象")
public class Schedule extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @NotNull(message = "ScheduleID不能为空", groups = {Update.class})
    @TableId(value = "ScheduleID", type = IdType.AUTO)
    private Integer ScheduleID;

    @NotNull(message = "不能为空")
    @TableField("SDate")
    private Date SDate;

    @NotNull(message = "不能为空")
    @TableField("CarrierID")
    private Integer CarrierID;

    @NotBlank(message = "不能为空")
    @TableField("WorkType")
    private String WorkType;

    @NotBlank(message = "不能为空")
    @TableField("Period")
    private String Period;

    @NotNull(message = "不能为空")
    @TableField("SchoolID")
    private Integer SchoolID;

    @NotNull(message = "不能为空")
    @TableField("AdminID")
    private Integer AdminID;

    @TableField("CreateTime")
    private Date CreateTime;

    @TableField("Deleted")
    private Integer Deleted;

    @TableField("SDateStr")
    private String SDateStr;

    @TableField("DormitoryName")
    private String DormitoryName;

    @TableField("ParcelCenterName")
    private String ParcelCenterName;

    @NotBlank(message = "不能为空")
    @TableField("CarrierName")
    private String CarrierName;

    @TableField(exist = false)
    private int taskNum;


    @TableField(exist = false)
    private int toDoTaskNum;

}
